function require() {

}
require("./js/jquery-3.2.1.min.js")

let $db = $("#deckbox")
let $video = $("#video")
/* 牌组 */
let $deck = $("#deck")
/*用于存储牌的字符串 */
let decks = ''

setintegral()

$video.trigger("play")      //背景视频播放
$video.muted=false
/**
 * 生成桌面堆叠的牌组
 */
getDecks()
function getDecks() {
    for (i = 0; i < 54; i++) {
        decks += '<li class="poker" style="top:-' + i / 2 + 'px"></li>'
    }
    $deck.html(decks)
}
let chatclick=0;
chat();
function chat(){
    $(".chat").on("click", function () {
        if(chatclick==0){
             $(".chat .chatbox").css({"display":"inline"});
             chatclick=1;
        }else{
            $(".chat .chatbox").css({"display":"none"});
             chatclick=0;
        }
           
       
    })

    for(let i =0;i<$(".chat .chatbox li").length;i++){
        $(".chat .chatbox li").eq(i).on("click", function () {
            let voice = document.getElementById("chat"+i);
            console.log(i);
		    	voice.play();
         })  
    }
    
}
bgMusicPlay();
function bgMusicPlay(){
    console.log("come")
    $(".voice").on("click", function () {
        let bgmusic = document.getElementById("bgmusic");
        bgmusic.pause();
        console.log("no")
        $(".voice").css({"display":"none"});
        $(".novoice").css({"display":"inline"});
    })    
    $(".novoice").on("click", function () {
        let bgmusic = document.getElementById("bgmusic");
        
        bgmusic.play();
        console.log("yes")
        $(".novoice").css({"display":"none"});
        $(".voice").css({"display":"inline"});
    })
}

/**
 * 点击发牌洗牌
 */

$db.on("click",shuffle)





